<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$type['title']}-{$GLOBALS['S']['title']}</title>
<meta name="keywords" content="{$type['keywords']} " />
<meta name="description" content="{$type['description']} " />
<link href="{$GLOBALS['S']['jwcdnapi']}{$GLOBALS['skin']}style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var site_dir="{$GLOBALS['WWW']}";
</script>
{include="js.html"}
<script src="{$GLOBALS['WWW']}include/js/DatePicker/WdatePicker.js" type="text/javascript"></script>
<script charset="utf-8" src="{$GLOBALS['WWW']}include/js/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="{$GLOBALS['WWW']}include/js/kindeditor/lang/zh_CN.js"></script>
<script src="{$GLOBALS['WWW']}include/js/dyfrom.js" type="text/javascript"></script>
<script type="text/javascript">
function postform(){
	value=$("#title").val();
	if(!dyfrom_max(value, 100)){
		alert('标题不能大于100个字符');return false;
	}
	value=$("#body").val();
	if(!dyfrom_max(value, 500)){
		alert('内容不能大于500个字符');return false;
	}
{if($GLOBALS['G_DY']['vercode']==1)}
	value=$("#vercode").val();
	if(dyfrom_ajax("{$GLOBALS['WWW']}index.php?c=ajax&a=vercode","vercode="+value)=='false'){
		alert('验证码输入错误');return false;
	}
{/if}
	return true;
}
</script>
</head>

<body>
{include="head.html"}
<div class="wpm list">
  <div class="tab11"></div>
  <div class="tab1 tab1b main">
    <div class="l">
      <div class="columnc"><h2>{$type['classname']}</h2></div>
      <div class="columncl">
      {loop table="classtype" pid="$type["tid"]" mshow="1" not="1" as="t"}
      <a href="{$t['url']}"{if($type['tid']==$t['tid'])} class="c"{/if}>{$t['classname']} </a>
      {/loop}
      </div>
    </div>
    <div class="r">
    <div class="content">
       <div class="position">当前位置：{$positions}</div>
       <div class="member_f">
<form action="{$GLOBALS['WWW']}index.php?c=message&a=add&tid={$type['tid']}" method="post" onsubmit="return postform();">

		{if($fmolds && $faid)}
        <input name="fmolds" type="hidden" value="{$fmolds}" />
		<input name="faid" type="hidden" value="{$faid}" />
		<dl><dt>来自：</dt><dd>{fun contentinfo($fmolds,$faid,'title')}</dd></dl>
        {/if}
        
		<dl><dt>姓名：</dt><dd><input name="title" id="title" type="text" class="inp" style="width:300px;" /></dd><dd class="m">{$v['m']}</dd></dl>
		<dl><dt>简介：</dt><dd><textarea name="body" id="body" class="inp" style="width:400px;"></textarea></dd><dd class="m">{$v['m']}</dd></dl>
		{foreach $fields as $v}
		<dl><dt>{$v['name']}：</dt><dd>{$v['input']}</dd><dd class="m">{$v['m']}</dd></dl>
		{/foreach}
{if($GLOBALS['G_DY']['vercode']==1)}
       <dl><dt>验证码：</dt><dd><input type="text" name="vercode" id="vercode" class="inp" style="width:80px;"/></dd><dd><img src="{$GLOBALS['WWW']}include/vercode.php" id="vercodeimg" width="60" height="25" onclick="newvercode();" style="cursor:pointer;" /></dd><dd class="m"></dd></dl>
<script type="text/javascript">
setTimeout('newvercode()',1000);
function newvercode(){
	document.getElementById("vercodeimg").src="{$GLOBALS['WWW']}include/vercode.php?a="+Math.random();
}
</script>
{/if}
       <dl style="border:0;"><dt>&nbsp;</dt><dd><input type="submit" value="提交留言" class="btnbig"/></dd></dl>
</form>
       </div>
    </div>
	<div class="comment">
         <div class="t c">留言列表</div>
         <div class="list">
         {foreach $lists as $s}
         <dl><dt>{$s['user']} 发布于 {fun date('Y-m-d H:i:s',$s['addtime'])}</dt>
         {if($fieldinfo)}<dd>{foreach $fieldinfo as $f}{$f['fieldsname']}：{$s[$f['fields']]}<br />{/foreach}</dd>{/if}
         <dd>{$s['body']}{if($s['reply'])}<br /><span style="color:#C00">管理员回复：{$s['reply']}</span>{/if}</dd></dl>
         {/foreach}
         </div>
	</div>
	<ul class="c pages">{$pages}</ul>
    </div>
  </div>
  <div class="tab12 mban"></div>
</div>
{include="bottom.html"}
</body>
</html>
